package com.weilive.core.netty;

import com.weilive.core.protocol.PacketError;

public class NettyException extends RuntimeException
{
	private static final long serialVersionUID = 2651717937578405544L;
	
	public final PacketError error;
	
    public NettyException(PacketError error) {
    	super(error.message);
    	this.error = error;
    }
    
    public NettyException(PacketError error, Throwable cause) {
    	super(error.message, cause);
    	this.error = error;
    }
    
    public PacketError getError() {
    	return error;
    }
}
